<template>
  <el-container id="home">
    <el-header>
      <div>
        <img src="@/assets/img/subculture_laurel.gif" alt="" />
        <el-button type="info" @click="leave">退出登录</el-button>
      </div>
    </el-header>
    <el-container>
      <el-aside width="200px">Aside</el-aside>
      <el-main>Main</el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  methods: {
    leave() {
      sessionStorage.clear();
      this.$router.push("/login");
      this.$message({
        type: "success",
        message: "您已退出登录",
        duration: 3000,
      });
    },
  },
  components: {},
};
</script>

<style lang="scss" scoped>
#home {
  height: 100vh;
  .el-header {
    background-color: #b3c0d1;
    color: #333;
    padding: 0;
    text-align: center;
    > div {
      display: flex;
      justify-content: space-between;
      img {
        width: 120px;
        height: 60px;
      }
      .el-button {
        text-align: center;
      }
    }
  }
  .el-aside {
    background-color: rgb(238, 241, 246);
  }
}
</style>